#include "minicalque.h"
#include "GraphicsArea/drawingarea.h"

MiniCalque::MiniCalque(DrawingArea* draw, Layer* layer,bool currentLayer){
    drawingMiniCalque = draw;
    layerMiniCalque = layer;
    setObjectName("test");
    if(currentLayer){
        focusCurrent();
    }
}
void MiniCalque::mousePressEvent ( QMouseEvent * event ){
    if(event->button() == Qt::LeftButton){
       drawingMiniCalque->setCurrentLayer(layerMiniCalque);
    }
}

void MiniCalque::changeEtatVisible(){
    layerMiniCalque->changeEtatVisible();
}

void MiniCalque::focusCurrent(){
    this->setStyleSheet("QWidget { border: 1px solid black;background-color: #FFD800;}");
}

